<?php //debug($this)?>
<div class="articles newsletter">
	<h1><?php echo __('Newsletter')?></h1>
	
	<h2><?php echo __('Preview newsletter')?></h2>
	<ul class="tabmenu">
		<li <?php if($preview=="html") echo 'class="selected"'?>>
			<?php echo $html->link(__('Html preview', true), array('action' => 'newsletter/' . $article['Article']['id'] . '/html' )) ?>
		</li>
		<li <?php if($preview=="text") echo 'class="selected"'?>>
			<?php echo $html->link(__('Text preview', true), array('action' => 'newsletter/' . $article['Article']['id'] . '/text' )) ?>
		</li>
	</ul>
	<?php if($preview=="html"):?>
		<div class="preview">
			<?php echo $this->render("/articles/view/" . $article['Article']['id'], 'email_html',  '../articles/email/newsletter_html'); ?>
		</div>
	<?php else: ?>
		<div class="preview">
			<?php echo $this->render("/articles/view/" . $article['Article']['id'], 'email_text', '../articles/email/newsletter_text'); ?>
		</div>
	
	<?php endif; ?>
	<div>
	 	
	</div>
	
	<?php echo $form->create('Article', array('action' => 'newsletter/' . $article['Article']['id']));?>
	<?php echo $form->input('id'); ?>
	<?php echo $form->end(__('Send newsletter', true));?>
	
</div>